package com.yp.infrastructure.mvc.consts;

import com.yp.infrastructure.common.exception.IErrorMessage;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 错误消息定义,关联至Localization.
 * Created by tju on 10/8/15.
 * 1. 来源(a)
 * 2. 业务类型(bb)
 * 3. 错误编号(cc)
 * 3. a-bb-cc
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum EnumErrorMessage implements IErrorMessage {

    SUCCESS(0, "success", "操作成功"),
    PARAMETERS_ERROR(20, "http.error.parameter", "参数错误"),
    REQUEST_ERROR(21, "http.request.error", "请求出错"),
    SERVER_ERROR(22, "http.server.error" , "服务器错误" )
    ;
    private int code;
    private String i18n;
    private String msg;

}
